package com.diaosidadui.test02;

public class Test02 {
    public static void main(String[] args) {
        String st1 = "boo:and:foo";
        String[] st2 = st1.split("oo");
        System.out.println("数组元素个数:"+st2.length);
        for (int i = 0; i < st2.length; i++) {
            System.out.println(st2[i]+"!");
        }

        String st3 = ",,,,,";
        String[] st4 = st3.split(" ",0);
        System.out.println("数组元素个数:"+st4.length);
        for (int i = 0; i < st4.length; i++) {
            System.out.println(st4[i]+"!");
        }


    }
}
